<template>
  <div>
    <h2>销售趋势/万元</h2>
    
    
    <dayEcharts v-if="props.lineState===0"></dayEcharts>
    <weekEcharts v-else-if="props.lineState===1" ></weekEcharts>
    <monthEcharts v-else-if="props.lineState===2"></monthEcharts>
    
    <nowEcharts v-else></nowEcharts>
  </div>
</template>

<script setup lang="ts">
import * as echarts from 'echarts';
import { ref, onMounted } from 'vue';
import weekEcharts from './echarts/weekEcharts.vue';
import monthEcharts from './echarts/monthEcharts.vue';
import dayEcharts from './echarts/dayEcharts.vue';
import nowEcharts from './echarts/nowEcharts.vue';
interface IProps{
  lineState:number
}
const props = defineProps<IProps>();

const dada = ()=>{
  console.log(props.lineState);
}




const chart = ref<echarts.ECharts | null>(null);


</script>

<style lang="scss" scoped>
#chartContainer {
  width: 100%;
  height: 400px;
}
</style>